/*
 * Copyright @ 苏州瑞云信息技术有限公司 All rights reserved.
 */
package cn.com.recloud.bbs.controller;


import cn.com.recloud.core.util.Result;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import cn.com.recloud.one.spring.controller.BaseController;

import cn.com.recloud.bbs.entity.metaoption;
import cn.com.recloud.bbs.service.MetaoptionService;

import javax.validation.constraints.NotBlank;
import java.util.List;
import java.util.Map;

/**
 * @author herry
 * @date 2020-06-08
 */
@RestController
@RequestMapping("/api/metadata/option")
public class MetaoptionController extends BaseController<metaoption,MetaoptionService> {

    @Autowired
    private MetaoptionService metaoptionService;

    /**
     * 通过选项集查询对应的选项集列表值
     *      * @param name
     * @return
     */
    @GetMapping("/option")
    public Result optionByName(@NotBlank(message="选项集名称不能为空") String name) {
        List<metaoption> metaOption= metaoptionService.selectMetaOptionBySetName(name);
        return new Result(metaOption);
    }
    @GetMapping("/all")
    public Result all(){

        return null;
    }

}

